<style>
    .vote-form {
        max-width: 600px;
        margin: 40px auto;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        background: white;
        padding: 30px;
        border-radius: 10px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    .vote-form h1 {
        color: #4a4a4a;
        font-size: 24px;
        margin-bottom: 25px;
        padding-bottom: 10px;
        border-bottom: 2px solid #f0f0f0;
    }
    
    .error-message {
        color: #e74c3c;
        background: #fde8e8;
        padding: 10px 15px;
        border-radius: 5px;
        margin-bottom: 20px;
        border-left: 4px solid #e74c3c;
    }
    
    .choice-list {
        margin: 20px 0;
    }
    
    .choice-item {
        display: block;
        position: relative;
        padding: 12px 0 12px 35px;
        margin-bottom: 10px;
        cursor: pointer;
        font-size: 16px;
        transition: all 0.3s ease;
    }
    
    .choice-item:hover {
        color: #6e8efb;
    }
    
    .choice-item input[type="radio"] {
        position: absolute;
        opacity: 0;
        cursor: pointer;
    }
    
    .radio-custom {
        position: absolute;
        top: 12px;
        left: 0;
        height: 20px;
        width: 20px;
        background-color: #fff;
        border: 2px solid #ddd;
        border-radius: 50%;
        transition: all 0.3s ease;
    }
    
    .choice-item:hover .radio-custom {
        border-color: #6e8efb;
    }
    
    .choice-item input[type="radio"]:checked ~ .radio-custom {
        background-color: #6e8efb;
        border-color: #6e8efb;
    }
    
    .radio-custom:after {
        content: "";
        position: absolute;
        display: none;
        top: 4px;
        left: 4px;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: white;
    }
    
    .choice-item input[type="radio"]:checked ~ .radio-custom:after {
        display: block;
    }
    
    .submit-btn {
        background: linear-gradient(135deg, #6e8efb, #a777e3);
        color: white;
        border: none;
        padding: 12px 25px;
        font-size: 16px;
        border-radius: 5px;
        cursor: pointer;
        transition: all 0.3s ease;
        margin-top: 10px;
    }
    
    .submit-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
</style>

<form action="{% url 'polls:vote' question.id %}" method="post" class="vote-form">
    {% csrf_token %}
    <h1>{{ question.question_text }}</h1>
    
    {% if error_message %}
    <div class="error-message">
        <strong>{{ error_message }}</strong>
    </div>
    {% endif %}
    
    <div class="choice-list">
        {% for choice in question.choice_set.all %}
        <label class="choice-item">
            <input type="radio" name="choice" id="choice{{ forloop.counter }}" value="{{ choice.id }}">
            <span class="radio-custom"></span>
            {{ choice.choice_text }}
        </label>
        {% endfor %}
    </div>
    
    <input type="submit" value="提交" class="submit-btn">
</form>